<template>
  <div class="login-container">
    <div class="login-weaper animated bounceInDown">
      <div class="login-left">
        <img class="img" src="@/assets/logo.jpg" alt="" />
        <p class="title" v-html="info"></p>
      </div>
      <div class="login-border">
        <div class="login-main">
          <h2 class="login-title">登录</h2>
          <userLogin></userLogin>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import userLogin from "./userlogin";
import { validatenull } from "@/utils/validate";
//登录页
export default {
  name: "login",
  components: {
    userLogin,
  },
  data() {
    return {
      info: "职业技能培训系统<br><br>后台",
    };
  },
  watch: {
    $route() {
      const params = this.$route.query;
      this.socialForm.state = params.state;
      this.socialForm.code = params.code;
      if (!validatenull(this.socialForm.state)) {
        const loading = this.$loading({
          lock: true,
          text: `登录中,请稍后。。。`,
          spinner: "el-icon-loading",
        });
        setTimeout(() => {
          loading.close();
        }, 2000);
      }
    },
  },
  created() {},
  mounted() {},
  computed: {},
  props: [],
  methods: {},
};
</script>

<style lang="scss">
@import "@/styles/login.scss";
</style>
